#include <57header.h>
// select 监听写继续 
// (基本上没有这个需求, 仅仅做理论上的演示)
int main(int argc,char*argv[])
{

    int pipe_fd = open("1.pipe", O_WRONLY);

    int times = 0;

    fd_set set;
    FD_ZERO(&set);

    while(1){
        FD_SET(pipe_fd, &set);

        printf("select before \n");
        select(10, NULL, &set, NULL, NULL);
        printf("select after \n");


        char buf[4096] = {0};
        write(pipe_fd, buf, sizeof(buf));

        times++;
        printf("times: %d \n", times);
    }


    return 0;
}

